package com.example.demo.utils.DB;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class DataSourceProperties {

    @Value("${spring.datasource.url}")
    private String datasourceUrl;

    @Value("${spring.datasource.username}")
    private String datasourceUsername;

    @Value("${spring.datasource.password}")
    private String datasourcePassword;

    @Value("${spring.datasource.driver-class-name}")
    private String datasourceDriverClassName;

    public void printDataSourceConfig() {
        System.out.println("URL: " + datasourceUrl);
        System.out.println("Username: " + datasourceUsername);
        System.out.println("Password: " + datasourcePassword);
        System.out.println("Driver Class Name: " + datasourceDriverClassName);
    }
}
